<!----start-header---->

<header id="top" role="banner" class="transition">
    <div class="container">
        <div class="navbar-header transition">
            <a href="/" title="首页"><img src="http://p6drizzla.bkt.clouddn.com/images/life.png" alt="lifes" title="首页"/></a>
        </div>

        <ul class="nav navbar-nav navbar-left">
            <li class="nav-news"><a href="/active" target="_blank" style="color: #333">活动</a></li>
        </ul>
        <#if login_user??>
            <ul class="nav navbar-nav navbar-left header-nav hidden-lg ">
                <li class="nav-news js-show-menu">
                    <a>${login_user.nickname!login_user.username} <span class="caret"></span></a>
                    <ul>
                        <li><a href="/u/${login_user.username}" target="_blank">我的资料</a></li>
                        <br>
                        <li><a href="/m" target="_blank">个人中心</a></li>
                        <br>
                        <li><a href="/logout">退出</a></li>
                    </ul>
                </li>

            </ul>

            <ul class="nav navbar-nav navbar-right header-nav hidden-sm">
                <li class="nav-news js-show-menu">
                    <a>${login_user.nickname!login_user.username} <span class="caret"></span></a>
                    <ul>
                        <li><a href="/u/${login_user.username}" target="_blank">我的资料</a></li>
                        <br>
                        <li><a href="/m" target="_blank">个人中心</a></li>
                        <br>
                        <li><a href="/logout">退出</a></li>
                    </ul>
                </li>

            </ul>


        <#else >
            <ul class="nav navbar-nav navbar-left header-nav hidden-lg">
                <li class="nav-news js-show-menu">
                    <img src="http://p3atba4ko.bkt.clouddn.com/nav-icon-gray.png">
                    <ul>
                        <li><a class="cd-signin" style="background-color: #fff;color:black;">登录</a></li><br>
                        <li><a class="cd-signup">注册</a></li>
                    </ul>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right hidden-sm">
                <li><a class="cd-signup">注册</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right hidden-sm">
                <li><a class="cd-signin" style="background-color: #fff;color:black;">登录</a></li>
            </ul>
        </#if>


    </div>

    <div class="cd-user-modal">
        <div class="cd-user-modal-container">

            <div id="cd-login" >
                <div class="modal-alert-title">登录</div>
                <div class="register">
                    <div class="register-top" id="reg-top"></div>
                    <div class="register-con" id="rc">
                        <div class="login-form username-box " style="margin-top:52px;">
                            <label class="login-label transition">
                                <input id="username" class="login-input" placeholder="登录名，数字/字母/下划线" maxlength="32"
                                       onkeyup="value=value.replace(/[\W]/g,'') "
                                       onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
                            </label>
                            <label class="login-label">
                                <input id="password" class="login-input password" type="password" placeholder="请输入6~32位数字和英文结合的密码~" maxlength="32"
                                       onkeyup="value=value.replace(/[\W]/g,'') "
                                       onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                                />
                            </label>
                            <div class="login-operation">
                                <a class="js-forget-passward pull-right">忘记密码</a>
                            </div>
                            <button class="js-btn-login btn-login" onclick="login_check()">登&nbsp;录</button>
                        </div>
                        <div class="js-open-register register-text">免费注册</div>
                    </div>
                </div>
            </div>

            <div id="cd-signup">
                <div class="modal-alert-title">免费注册</div>
                <div class="user-register-box">
                    <div class="login-form sms-box">
                        <label class="login-label transition">
                            <input id="register_username"  name="username" class="login-input" placeholder="登录名，数字/字母/下划线" maxlength="32"
                                   onkeyup="value=value.replace(/[\W]/g,'') "
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                            />
                        </label>
                        <label class="login-label">
                            <input id="register_password" name="password" class="login-input password" type="password" placeholder="请输入6~32位数字和英文结合的密码~" maxlength="32"
                                   onkeyup="value=value.replace(/[\W]/g,'') "
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                            />
                        </label>
                        <label class="login-label transition">
                            <input id="register_email"  name="email" class="login-input" placeholder="邮箱" maxlength="64"/>
                        </label>
                        <label class="login-label captcha">
                            <input name="imageCode" value="" class="login-input" placeholder="输入4位验证码" maxlength="4"
                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                   onafterpaste="this.value=this.value.replace(/\D/g,'')"
                            />
                            <a onclick="sendImageCode('register_email')" id="imageCodeImg"><span class="js-btn-captcha btn-captcha">获取验证码</span></a>
                            <span class="yzmTip"></span>
                        </label>
                        <button class="js-btn-sms-login btn-login" onclick="register_check()">注&nbsp;册</button>
                    </div>
                    <div class="js-user-login register-text">已有账号，立即登录</div>
                </div>
            </div>

            <div id="cd-forgetpwd">
                <div class="modal-alert-title">找回密码</div>
                <div class="user-register-box">
                    <div class="login-form sms-box">
                        <label class="login-label transition">
                            <input id="forget_username"  name="username" class="login-input" placeholder="登录名，数字/字母/下划线" maxlength="32"
                                   onkeyup="value=value.replace(/[\W]/g,'') "
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
                        </label>
                        <label class="login-label transition">
                            <input id="forget_email"  name="email" class="login-input" placeholder="邮箱" maxlength="64"/>
                        </label>
                        <button class="js-btn-sms-login btn-login" onclick="forgetpwd_check()">找&nbsp;回</button>
                    </div>
                    <div class="js-user-login register-text">返回登录</div>
                </div>
            </div>

            <a class="cd-close-form ">关闭</a>
        </div>
    </div>

</header>
<div class="placeholder-height"></div>
<!----end-header---->